<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>文件上传案例</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body style="padding: 50px">

<form role="form" method="post" enctype="multipart/form-data">
    <div class="form-group">
        <h1>单个文件上传</h1>
    </div>
    <div class="form-group">
        <label for="inputfile">上传文件：</label>
        <input type="file" name="file" >
    </div> <button type="submit" class="btn btn-default">提交</button>
</form>
<form role="form" method="post" enctype="multipart/form-data">
    <div class="form-group">
        <h1>多文件上传</h1>
    </div>
    <div class="form-group">
        <input type="file" name="file[]">
    </div>
    <div class="form-group">
        <input type="file" name="file[]">
    </div>
    <div class="form-group">
        <input type="file" name="file[]">
    </div>
    <div class="form-group">
        <input type="file" name="file[]">
    </div>
    <button type="submit" class="btn btn-default">提交</button>
</form>

</body>
</html>